import request from "@/utils/request";

// 分页获取电表型号列表
export function getMeterPageList(params) {
  return request({
    url: "/energyMeter/pageList",
    method: "get",
    params,
  });
}

// 获取电表型号列表
export function getMeterList(params) {
  return request({
    url: "/energyMeter/list",
    method: "get",
    params,
  });
}

// 新增电表型号
export function addMeter(data) {
  return request({
    url: "/energyMeter/add",
    method: "post",
    data,
  });
}

// 修改电表型号
export function updateMeter(data) {
  return request({
    url: "/energyMeter/update",
    method: "put",
    data,
  });
}

// 删除电表型号 /energyMeter/delete/{mo
export function deleteMeter(modelId) {
  return request({
    url: "/energyMeter/delete/{modelId}",
    method: "delete",
    params: { modelId },
  });
}

// 根据型号id获取电表型号详情
export function getMeter(modelId) {
  return request({
    url: "/energyMeter/getEnergyMeterById/{modelId}",
    method: "get",
    params: { modelId },
  });
}
